package cn.bisoft.java.bean.entity;

import java.io.Serializable;



/**
 * This is an object that contains data related to the HP_flag_name table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="HP_flag_name"
 */

public abstract class BaseHpFlagName  implements Serializable {
	private static final long serialVersionUID = 1L;
	public static String REF = "HpFlagName";
	public static String PROP_FLAG_NAME = "flag_name";
	public static String PROP_COL_NAME = "col_name";
	public static String PROP_TABLE_NAME = "table_name";
	public static String PROP_FLAG_ID = "flag_id";
	public static String PROP_ID = "id";


	// constructors
	public BaseHpFlagName () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseHpFlagName (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String table_name;
	private java.lang.String col_name;
	private java.lang.Integer flag_id;
	private java.lang.String flag_name;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="assigned"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: table_name
	 */
	public java.lang.String getTable_name () {
		return table_name;
	}

	/**
	 * Set the value related to the column: table_name
	 * @param table_name the table_name value
	 */
	public void setTable_name (java.lang.String table_name) {
		this.table_name = table_name;
	}



	/**
	 * Return the value associated with the column: col_name
	 */
	public java.lang.String getCol_name () {
		return col_name;
	}

	/**
	 * Set the value related to the column: col_name
	 * @param col_name the col_name value
	 */
	public void setCol_name (java.lang.String col_name) {
		this.col_name = col_name;
	}



	/**
	 * Return the value associated with the column: flag_id
	 */
	public java.lang.Integer getFlag_id () {
		return flag_id;
	}

	/**
	 * Set the value related to the column: flag_id
	 * @param flag_id the flag_id value
	 */
	public void setFlag_id (java.lang.Integer flag_id) {
		this.flag_id = flag_id;
	}



	/**
	 * Return the value associated with the column: flag_name
	 */
	public java.lang.String getFlag_name () {
		return flag_name;
	}

	/**
	 * Set the value related to the column: flag_name
	 * @param flag_name the flag_name value
	 */
	public void setFlag_name (java.lang.String flag_name) {
		this.flag_name = flag_name;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof HpFlagName)) return false;
		else {
			HpFlagName hpFlagName = (HpFlagName) obj;
			if (null == this.getId() || null == hpFlagName.getId()) return false;
			else return (this.getId().equals(hpFlagName.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}